package org.jeecg.modules.friends.service.req;

import static org.jeecg.modules.friends.utils.StringTool.containsContactInfo;

import org.jeecg.modules.friends.base.S;

import lombok.Data;

/**
 * Created on 2025-01-21
 */
@Data
public class PublishMomentsReviewReq {
    private Long momentsId;
    private String reviewContent;
    private Long atUserId;
    private String atUserName;
    public void validate() {
        S.assertIsNotBlank(reviewContent, "内容不能为空");
        S.assertIsTrue(reviewContent.length() <= 200, "内容不能超过200个字符");
        S.assertIsTrue(!containsContactInfo(reviewContent), "包含联系方式，请重新填写！");
    }
}
